<?php 
include '../include/init.php';
include '../include/common.fun.php';
include '../include/mysql.config.php';

islogin();
include '../data/admin_data.php';
$current = isset($_GET['page'])?$_GET['page']+0:1;
$sql = "SELECT COUNT(*) AS count FROM wd_partner";
$partnet_count = $db->getOne($sql);
$count = $partnet_count['count'];
$limit = 6;
$start = ($current-1)*$limit;

$page = new Page($current,$count,$limit,5);
$page_link = $page->first()->prev()->num()->next()->show();

$sql = "SELECT * FROM wd_partner ORDER BY par_order DESC,par_addtime aSC LIMIT $start,$limit";
$partner = $db->getAll($sql);
// dump($service);


include "view/partner_list.php";
